package com.qf.fmall2203.prosku.controller;

import com.qf.fmall2203.prosku.service.IProductSkuService;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * 商品规格 每一件商品都有不同的规格，不同的规格又有不同的价格和优惠力度，规格表为此设计 前端控制器
 * </p>
 *
 * @author CM
 * @since 2023-02-14
 */
@RestController
@RequestMapping("/product")
@CrossOrigin
public class ProductSkuController {

    @Autowired
    IProductSkuService productSkuService;

    @GetMapping("/detail-info/{id}")
    public Map<String,Object> getProSku(@PathVariable("id") Integer id){

        HashMap<String, Object> map = new HashMap<>();

        map = productSkuService.getProSku(id);

        return map;

    }

}
